From: Sebastian Keller Date: Thu, 26 Mar 2026 18:29:44 +0000 (+0100) Subject: keyboard: Ensure minimum height of the OSK always fits on screen X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~10^2^2~78 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8723f43c22f314c27d20d0a20bb33b31833472d7;p=gnome-shell.git keyboard: Ensure minimum height of the OSK always fits on screen At very low resolutions, 1/3 of the screen height might not be enough for the minimum height of the OSK, causing some keys to get pushed out of the screen. This now ensures the height is always at least the minimum height, but only up to 1/2 of the screen to avoid situations where the OSK would cover the whole screen preventing any other interaction. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/9126 Part-of: --- diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 644409e35..e2d12a155 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1623,6 +1623,7 @@ export const Keyboard = GObject.registerClass({ _relayout() { const monitor = Main.layoutManager.keyboardMonitor; + const [minHeight] = this.get_preferred_height(-1); if (!monitor) return; @@ -1633,6 +1634,8 @@ export const Keyboard = GObject.registerClass({ this.height = monitor.height / 3; else this.height = monitor.height / 4; + + this.height = Math.clamp(this.height, minHeight, monitor.height / 2); } _updateKeys() {